In conventional video encoding methods, motion prediction is performed by block-matching based on minimization of the difference in pixel values between frames, thereby enhancing the encoding performance. However, for an image such as a fade image whose brightness varies over time, the prediction residual of the motion prediction increases by an amount equivalent to the brightness variation, and the encoding performance is thereby degraded.
Accordingly, in H.264/AVC shown in Non-Patent Document 1, weighted motion prediction is performed by adaptively applying a weight coefficient to a reference picture for motion prediction. This weighted motion prediction generates a prediction reference signal with corrected temporal brightness variation, thereby enhancing the encoding performance.
H.264/AVC includes two methods for weighted motion prediction: explicit mode which encodes a weight coefficient used in brightness correction and transmits it, and implicit mode which, instead of transmitting the weight coefficient, uses reference frame information to indirectly create the same weight coefficient at an encoder and a decoder. Table 1 shows categories and predicting methods of weighted motion prediction in P slice and B slice.
TABLE 1Categories and Methods of WeightedMotion Prediction in H.264/AVCPredictionCoefficientTypeCategoryPrediction SignalTransmissionP slice—z = w0 · r0 + d0Transmit w0, d0(Explicit)B sliceL0/L1z = w0 · r0 + d0Transmit w0, d0, w1, d1Prediction(L0 Prediction)(Explicit)z = w1 · r1 + d1(L1 Prediction)Bi-z = w0 · r0 + w1 · r1 + dTransmit w0, d0, w1, d1Prediction(d = 1/2(d0 + d1))(Explicit)z = w0 · r0 + w1 · r1Calculate w0 and w1 inaccordance withdistance from referencepicture (Implicit)
In Table 1, z is a weighted motion prediction signal, r0 and r1 are weighted motion prediction reference signals, w0, w1, d0, and d1 are weight coefficients. Weighted motion prediction switching and weight coefficient transmission mode selection are executed in slice units.
FIG. 20 is an explanatory diagram of weighted motion prediction (implicit mode) in H.264/AVC. Implicit mode is used only for bi-prediction in B slices. Assuming that brightness variation in an encoding target frame and two reference frames is linear, proportional coefficients w0 and w1 are calculated in accordance with the distance from the reference frames. An offset coefficient d is set at 0.
While in the example of FIG. 20, the proportional coefficients are calculated by internal division in accordance with the distances from the reference frames, calculation by external division can be performed in the same way.
A scalable extension method (JSVC) in the H.264/AVC shown in Non-Patent Document 2 has been standardized by the NT, which is a joint team of the ISO and the ITU-T, and currently employs the same weighted motion prediction as the H.264/AVC mentioned above. A JSVC reference encoder JSVM shown in Non-Patent Document 3 also uses the weighted motion prediction shown in Table 1.
One known technology for detecting the overall change in brightness of a video image and performing brightness compensation is disclosed in Patent Document 1. The technology disclosed in Patent Document 1 uses an overall brightness variation amount of an entire screen, and a flag indicating a determination of whether to compensate brightness variation in each small region, and can be used in cases where the brightness variation is non-uniform within the screen.    Non-Patent Document 1: ITU-T: “Advanced video coding for generic audiovisual services”, ITU-T Rec. H.264, pp. 129-132, May, 2003.    Non-Patent Document 2: T. Wiegand, G. Sullivan, J. Reichel, H. Schwarz and M. Wien: “Joint Draft 8 of SVC Amendment”, ISO/IEC JTC1/SC29/WG11 and ITU-T SG16 Q.6, JVT-U201, pp. 166-170, October, 2006.    Non-Patent Document 3: J. Reichel, H. Schwarz and M. Wien: “Joint Scalable Video Model JSVM-8”, ISO/IEC JTC1/SC29/WG11 and ITU-T SG16 Q.6, JVT-U202, October, 2006.    Patent Document 1: Japanese Unexamined Patent Publication, First Publication No. H10-32824.